package com.xdap.keymen.controller.punch;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.xdap.keymen.config.PunchConfig;
import com.xdap.keymen.utils.OKHttpUtils;
import com.xdap.motor.annotation.RestWrapper;
import com.xdap.motor.vo.ResponseVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/custom/punch/test")
@RequiredArgsConstructor
@Slf4j
public class PunchTestController {
    @Autowired
    PunchConfig punchConfig;

    @Autowired
    OKHttpUtils okHttpUtils;

    @GetMapping("/test")
    @RestWrapper
    public ResponseVo getTest() {
//        log.info("测试token url={}",punchConfig.getUrl());
//        String response = okHttpUtils.doPost(punchConfig.getUrl().concat("/CRM/api/punchToken"));
//        log.info("测试token={}",response);
        return ResponseVo.error("不存在此订单号");
    }
}
